package com.lhy.common.web.wrapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lhy.common.web.entity.DbField;
import org.springframework.util.StringUtils;

public abstract class AbstractSearchComparator implements SearchComparator {


    @Override
    public abstract void accept(QueryWrapper queryWrapper, DbField dbField);

    @Override
    public boolean valid(DbField dbField) {
        return StringUtils.hasText(dbField.getName()) && StringUtils.hasText(dbField.getValue());
    }


}
